<?php
/**
 * LOAD MODULES
 * @author Gedalias
 *
 */
class Third_LayoutLoader extends Zend_Controller_Action_Helper_Abstract {
    public function preDispatch()
    {
        $bootstrap = $this->getActionController()
                         ->getInvokeArg('bootstrap');
        $config = $bootstrap->getOptions();
        $module = $this->getRequest()->getModuleName();
        
        
                    
        if (isset($config['resources']['layout']['layout'])) {
            $layoutPath = $config['resources']['layout']['layoutPath'];
            $layoutScript = $config['resources']['layout']['layout'];

            $this->getActionController()
                 ->getHelper('layout')
                 ->setLayout($layoutScript)
                 ->setLayoutPath( $layoutPath );
        }
    }
}


?>